﻿using System;
using System.Globalization;
using System.Threading;


using NetDon.eBoss.Portal.Common;
using NetDon.Utilities;


namespace NetDon.eBoss.Portal
{
    public class Global : Microsoft.Practices.CompositeWeb.WebClientApplication
    {
        protected override void Application_Start(object sender, EventArgs e)
        {
           base.Application_Start(sender, e);
        }

        protected override void Application_PreRequestHandlerExecute(object sender, EventArgs e)
        {
            try
            {
                string lan = Request["language"];
                if (string.IsNullOrEmpty(lan))
                {
                    lan = SettingsManager.Globalization.DefaultCulture;
                }
                CultureInfo culture = CultureInfo.CreateSpecificCulture(lan);
                Thread.CurrentThread.CurrentUICulture = culture;
                Thread.CurrentThread.CurrentCulture = culture;
                base.Application_PreRequestHandlerExecute(sender, e);
            }
            catch (Exception)
            {
               
            }
          
        }

        protected void Session_Start(object sender, EventArgs e)
        {
     
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
           
        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {
           
        }
    }
}